package com.example.s3demo.utils

import java.text.DateFormat
import java.text.SimpleDateFormat
import java.util.*

object DateUtil {
    fun dateFormatToSecond(date: Date?): String {
        val df: DateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
        val tag = df.format(date)
        return tag
    }

    fun dateTagToSecond(): String {
            val df: DateFormat = SimpleDateFormat("yyyyMMddHHmmss")
            val tag = df.format(Date())
            return tag
        }

    fun UTCDateFormat(): String {
            val df: DateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
            val tag = df.format(Date())
            return tag
        }
}
